package com.lbtc.dao;

import com.lbtc.domian.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
@Repository
@Mapper
public interface UserMapper {
    int deleteByPrimaryKey(Integer id);
    //静态sql
    int insert(User record);
    //动态Sql
    int insertSelective(User record);

    User selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    User selectByName(String username);
    //有bug
    User selectByNameOrPassword(String username, String password);

    User selectByLogin(@Param("username") String username,@Param("password") String password);
}